.TH std::atomic_fetch_xor,std::atomic_fetch_xor_explicit 3 "2024.06.10" "http://cppreference.com" "C++ Standard Libary"
.SH NAME
std::atomic_fetch_xor,std::atomic_fetch_xor_explicit \- std::atomic_fetch_xor,std::atomic_fetch_xor_explicit

.SH Synopsis
   Defined in header <atomic>
   template< class T >

   T atomic_fetch_xor( std::atomic<T>* obj,                           \fB(1)\fP \fI(since C++11)\fP

                       typename std::atomic<T>::value_type arg )
   noexcept;
   template< class T >

   T atomic_fetch_xor( volatile std::atomic<T>* obj,                  \fB(2)\fP \fI(since C++11)\fP

                       typename std::atomic<T>::value_type arg )
   noexcept;
   template< class T >

   T atomic_fetch_xor_explicit( std::atomic<T>* obj,
                                typename std::atomic<T>::value_type   \fB(3)\fP \fI(since C++11)\fP
   arg,

                                std::memory_order order) noexcept;
   template< class T >

   T atomic_fetch_xor_explicit( volatile std::atomic<T>* obj,
                                typename std::atomic<T>::value_type   \fB(4)\fP \fI(since C++11)\fP
   arg,

                                std::memory_order order) noexcept;

   Atomically replaces the value pointed by obj with the result of bitwise XOR between
   the old value of obj and arg. Returns the value obj held previously.

   The operation is performed as if the following is executed:

   1,2) obj->fetch_xor(arg)
   3,4) obj->fetch_xor(arg, order)

   If std::atomic<T> has no fetch_xor member (this member is only provided for integral
   types except bool), the program is ill-formed.

.SH Parameters

   obj   - pointer to the atomic object to modify
   arg   - the value to bitwise XOR to the value stored in the atomic object
   order - the memory synchronization ordering

.SH Return value

   The value immediately preceding the effects of this function in the modification
   order of *obj.

.SH Example

    This section is incomplete
    Reason: no example

   Defect reports

   The following behavior-changing defect reports were applied retroactively to
   previously published C++ standards.

     DR    Applied to         Behavior as published         Correct behavior
   P0558R1 C++11      exact type match was required because T is only deduced
                      T was deduced from multiple arguments from obj

.SH See also

                             atomically performs bitwise XOR between the argument and
   fetch_xor                 the value of the atomic object and obtains the value held
                             previously
                             \fI(public member function of std::atomic<T>)\fP
   atomic_fetch_or           replaces the atomic object with the result of bitwise OR
   atomic_fetch_or_explicit  with a non-atomic argument and obtains the previous value
   \fI(C++11)\fP                   of the atomic
   \fI(C++11)\fP                   \fI(function template)\fP
   atomic_fetch_and          replaces the atomic object with the result of bitwise AND
   atomic_fetch_and_explicit with a non-atomic argument and obtains the previous value
   \fI(C++11)\fP                   of the atomic
   \fI(C++11)\fP                   \fI(function template)\fP
   C documentation for
   atomic_fetch_xor,
   atomic_fetch_xor_explicit

.SH Category:
     * Todo no example
